SimulateDriveRemainingSpace

Simulates a drive with remaining free space. The amount of remaining space cannot be more than the available drive space.

For example, if you are testing an application that deletes temporary files to free up space, you can simulate a drive that does not have enough free space to save files. When the application deletes the files, more space is available on the simulated drive and new files can be saved to it.

Note: Any actions performed on files outside the target application, such as a user manually deleting files, are not included while drive simulation is active.

Syntax

SimulateDriveRemainingSpace(DriveLetter, MegabytesRemaining)

Arguments

Argument Description
DriveLetter Drive letter for the simulated drive.
MegabytesRemaining Number of available megabytes on the drive. Use floating point values for fractions or SimulationOff to turn off the simulation.

Example

SimulateDriveRemainingSpace("C", 0)

Window("WysiCorp CRM").Menu("MenuBar").Select("File/Save")

Window("Error").Button("OK").Click()

SimulateDriveReadOnly("C", SimulationOff)